{include file="kuerp/common/menu" /}
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="row">
        <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-4">{:__('Customertype_id')}:</label>
                <div class="col-xs-12 col-sm-8">
                    {:build_select('row[customertype_id]', $customertype, null, ['class'=>'form-control selectpicker', 'data-rule'=>'required','id'=>'c-customertype_id'])}
                </div>
            </div>
        </div>
        <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-4">{:__('Customerlevel_id')}:</label>
                <div class="col-xs-12 col-sm-8">
                    {:build_select('row[customerlevel_id]', $levellists, null, ['class'=>'form-control selectpicker', 'data-rule'=>'required','id'=>'c-customerlevel_id'])}
                </div>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-4"><span class="must">*</span>{:__('客户编号')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-customer_code" data-rule="required" class="form-control" name="row[customer_code]" type="text" value="{$code|default=''}" placeholder="{:__('客户编号')}">
                </div>
            </div>
        </div>
        <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-4"><span class="must">*</span>{:__('Customer_name')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-customer_name" data-rule="required" class="form-control" name="row[customer_name]" type="text" value="" placeholder="{:__('Customer_name')}">
                </div>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-4">{:__('余额日期')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-account_time" class="form-control" data-use-current="true" name="row[account_time]" type="text" placeholder="{:__('余额日期')}">
                </div>
            </div>
        </div>
        <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-4">{:__('期初应收款')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-receive_account" class="form-control" data-use-current="true" name="row[receive_account]" type="text" placeholder="{:__('期初应收款')}">
                </div>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-4">{:__('期初预收款')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-opening_prepayment" class="form-control" data-use-current="true" name="row[opening_prepayment]" type="text" placeholder="{:__('期初预收款')}">
                </div>
            </div>
        </div>
        <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-4">{:__('纳税人识别号')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-identification" class="form-control" data-use-current="true" name="row[identification]" type="text" placeholder="{:__('纳税人识别号')}">
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-4">{:__('开户银行')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-deposit_bank" class="form-control" name="row[deposit_bank]" type="text" placeholder="{:__('开户银行')}">
                </div>
            </div>
        </div>
        <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-4">{:__('银行账号')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-bank_number" class="form-control" name="row[bank_number]" type="text" placeholder="{:__('银行账号')}">
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-4">{:__('销售人员')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <select  id="c-staff_member_id" class="form-control selectpicker" name="row[staff_member_id]">
                        <option value="">请选择销售人员</option>
                        {foreach name="saleList" item="vo"}
                        <option value="{$vo.id}">{$vo.name}</option>
                        {/foreach}
                    </select>
                </div>
            </div>
        </div>
    </div>

    <div class="list">
        <table>
            <tr>
                <th></th><th><span class="must">*</span>联系人</th><th>手机</th><th>座机</th><th>QQ/微信/Email</th><th>联系地址</th><th>首要联系人</th>
            </tr>
            <tr>
                <td><div class="btn"><span class="add"><i class="fa fa-plus"></i></span><span class="del"><i class="fa fa-trash"></i></span></div></td>
                <td><div><input type="text" name="user[name][]"><input type="hidden" name="user[id][]" value=""></div></td>
                <td><div><input type="text" name="user[mobile][]"></div></td>
                <td><div><input type="text" name="user[phone][]"></div></td>
                <td><div><input type="text" name="user[qqnum][]"></div></td>
                <td><div><input type="text" name="user[address][]"></div></td>
                <td><div><select name="user[first][]"><option value="0">否</option><option value="1">是</option></select></div></td>
            </tr>
            <tr>
                <td><div class="btn"><span class="add"><i class="fa fa-plus"></i></span><span class="del"><i class="fa fa-trash"></i></span></div></td>
                <td><div><input type="text" name="user[name][]"><input type="hidden" name="user[id][]" value=""></div></td>
                <td><div><input type="text" name="user[mobile][]"></div></td>
                <td><div><input type="text" name="user[phone][]"></div></td>
                <td><div><input type="text" name="user[qqnum][]"></div></td>
                <td><div><input type="text" name="user[address][]"></div></td>
                <td><div><select name="user[first][]"><option value="0">否</option><option value="1">是</option></select></div></td>
            </tr>
            <tr>
                <td><div class="btn"><span class="add"><i class="fa fa-plus"></i></span><span class="del"><i class="fa fa-trash"></i></span></div></td>
                <td><div><input type="text" name="user[name][]"><input type="hidden" name="user[id][]" value=""></div></td>
                <td><div><input type="text" name="user[mobile][]"></div></td>
                <td><div><input type="text" name="user[phone][]"></div></td>
                <td><div><input type="text" name="user[qqnum][]"></div></td>
                <td><div><input type="text" name="user[address][]"></div></td>
                <td><div><select name="user[first][]"><option value="0">否</option><option value="1">是</option></select></div></td>
            </tr>
        </table>
    </div>

    <div class="row">
        <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
            <textarea id="c-note" class="form-control" rows="5" name="row[note]" cols="30" placeholder="添加备注信息，不超过100个字"></textarea>
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
